Wednesday, May 19, 2010

Samsung Click to Dial

So the new jobs coming along and the boss comes up to me and out of no where asks .... can I have click to dial from outlook.

That started me on the path to the samsung office link server (trust me that's just bad software) so I created a click to dial add on for the samsung officeserv 7000 series phone system.

You can check it out at


We offer a free Demo version and everything

Tuesday, December 1, 2009

parameterizedthreadstart

So I finished the letter generator, which works fairly well, now it time to get back to the main program. I added a logging feature about a month ago so I started looking through that, in it I saw two problems. The first was a the screen resolution on one of the station was "changing" when the monitors went to sleep I will post about that later. The other problem was I had a function that has one overload. I was trying to launch that in its own thread when I went back I saw in the logs this error:

InvaildOperationException: This thread was created using a ThreadStart delegate instead of a ParameterizedThreadStart delegate

I did a little googling and found a page on MSDN that said all I had to do was use the addressof function and it would firgure everything out for me. Since thats what I was doing I started looking other places.

The only think I found was the ParameterizedThreadStart object on MSDN again. So I started looking at the C# code did a little thinking and boom ....

Dim TempThread as new threading.thread(new threading.parameterizedthreadstart(addressof DoWork))
TempThread.start("11")


That worked great

Tuesday, November 3, 2009

Richtextbox - Drag And Drop

So I'm still working on that "letter editor" which is going alright ... I haven't hit and real road blocks. I did however come across this little issue .... I have a treeview control on the left hand side of my project which contains a list of all the objects I want them to be able to work with. I wanted to allow them to drag and drop those over to the richtextbox and format those so my program could parse it and turn it in to a actual document.

I found some drag and drop code (its everywhere ... google it) impletmented that and things seemed to be working, the only problem was I couldn't firgure out how to insert the text where the cursor was ... the code that I found used the appendtext command which as we all know appends the text to the end of the text box. So I'm not sure if this is the best answer but what I did was add a 2nd richtextbox to my project (I hide it under the first one so its out of the way) ... then when I dropped the text in I actually added the text to the 2nd textbox used the selectall command ... then the copy command and the paste command

ie

richtextbox2.text = Directcast(e.data.getdata(gettype(string),string)
richtextbox2.selectall
richtextbox2.cut
richtextbox1.paste

this let me insert the command where the cursor was used to drop the command at...

there might be a better way ... but it works for me

Friday, October 30, 2009

RichTextBox - Bold

So I have been working on creating letter editor. I started with a richtextbox then I extended it to inculde some standard functions that I think should have been in there from the start.

for example I added a public property for bold which overrides the default read-only bold property, allowing you to set a value

I'll inculde the code for that ...



Public Property Bold() As Boolean
Get
Return MyBase.SelectionFont.Bold
End Get
Set(ByVal value As Boolean)
Dim TempFont As Font
If value = True Then
If MyBase.SelectionFont.Italic = True Then
If MyBase.SelectionFont.Underline = True Then
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Italic Or FontStyle.Underline Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Italic Or FontStyle.Underline)
End If
Else
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Italic Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Italic)
End If
End If
Else
If MyBase.SelectionFont.Underline = True Then
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Underline Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Underline)
End If
Else
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Bold)
End If
End If
End If
Else
If MyBase.SelectionFont.Italic = True Then
If MyBase.SelectionFont.Underline = True Then
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Italic Or FontStyle.Underline Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Italic Or FontStyle.Underline)
End If
Else
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Italic Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Italic)
End If
End If
Else
If MyBase.SelectionFont.Underline = True Then
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Underline Or FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Underline)
End If
Else
If MyBase.SelectionFont.Strikeout = True Then
TempFont = New Font(MyBase.SelectionFont, FontStyle.Strikeout)
Else
TempFont = New Font(MyBase.SelectionFont, FontStyle.Regular)
End If
End If
End If
End If

MyBase.SelectionFont = TempFont
End Set
End Property

Thursday, October 29, 2009

Click Once - Start With Windows

So we use a clickonce application because I never get anything right the first time ...

This is great kinda ...

Click Once lets me send a email with a url out to all the guys .. all they have to do is click on the install button on the web page, next thing you know they have everything installed and everyone is happy.

The best thing about click once, at least in my mind, is all i have to do to update the project is click the publish button in VS. From there it updates the manfest file and publishes everything to the web page. The project checks for updates everytime it starts, installs them and launchs the application in one quick click on of the mouse.

Click once has its bummers ... starting up with windows is a big one. I've read all the other blogs and articles about starting with windows, I couldn't really find any that used my approach. It does still have its problem but its not a big one (atleast I don't think so ... more on that later)

So there isn't any way in the framework to add start with windows options, but thats not that big of deal, what I do is add a entry to the registry to start with windows. Here is the code for that:

Private Sub AddToStartUp()

Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
regKey.SetValue("ePick List", Application.ExecutablePath)
regKey.Close()

End Sub



Now this works most of the time, sometimes it has issues right after an update, but if you don't update that offten you probably won't have an issue. Everyone else likes to complain about uninstall, I know its not the best solution for that but its better then coping the icon to the startup folder. When you uninstall this application it leaves the registry entry there, but since the application isn't there ... nothing happens

Sunday, July 6, 2008

New Site Launching Soon

Our New Site will be launching soon ...