|
I Can't be of much help unless I see some code examples.
You're not setting any visible properties to false for the list ctrls are you?
Post the code for the Perform Import event.
|
|
|
|
|
Hi, I am populating a grid from an array which contains a list of records. I have to include a combobox in the grid at runtime and combo should contain different items for each data row in the grid.
But when I create a DataGridViewComboBoxColumn and assign it to the grid, the combo items are same for each row, I have no idea how to create unique combo list to each row. I will appreciate if someone can help me
Thanks
Nas
|
|
|
|
|
dear manish,
you have to add a new combolist everytime.
so in the itemdatabound column make sure the combolist is new or not.
then add the items there. it is very simple to check them.
All The Best
Sathesh Pandian
|
|
|
|
|
Hi Everyone,
I'm writing an application that implements an on-screen keyboard (because the Windows on-screen keyboard is extremely small and hard to use) and I'm having problems setting focus to the desired window in which the user wishes to type.
I'm using a few User32 API calls to get the active window handle number and then set the active window once I know what the handle is. This seems to be working OK. However, the window which has focus (the one receiving the typing) flickers as the user clicks on a key.
This is because as the user touches a key to type, it gives the keyboard focus and then immediately sends focus back to the window in which the user is typing, hence the flickering. So...
Question #1:
How can I eliminate the change of focus and always give focus to the desired window so that there is no flickering back and forth between my keyboard application and the window receiving the typing?
Question #2:
This is not just a standalone keyboard, but is a small part of a larger piece of software. Consequently, there are occasions when the user must use this on-screen keyboard to type into a window within it's parent application or into different forms within the app. One form contains a browser control to a company website. When they keyboard is used to type into any text field on a webpage displayed in the browser control, only every other word is sent to that text box. Two key strokes are required to output one letter. What could be a possible cause of this and how might I go about fixing it?
ANY suggestions or help is much appreciated. Code examples in VB.NET, VB 2005, and C# are fine. C++ OK too but only if it's immediately applicable and can be converted easily to VB.NET.
Thanks in advance to anyone who contributes!!!!
Patrick
|
|
|
|
|
Hi,
I'm using MAPISession and MAPIMessage components to access MS Outlook emails but the "Fetch" does not retrieve any read emails.
The code I have is as follows:
...
MAPISession1.Username = "Outlook"
MAPIMessage1.DownloadMail = True
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Fetch
iNumOfMsgs = MAPIMEssages1.MsgCount 'iNumOfMsgs declared as a local var
...
iNumOfMsgs returns 0 when there are 100 read emails
Any help with this is very much appreciated
|
|
|
|
|
Hi,
If I have text like:
VariantDisplayMode
How do I break it up so that it displays as:
Variant Display Mode?
Basically it is a seperation at the capital letters.
Regards
ma se
|
|
|
|
|
Use the Regex class with a regular expression pattern like "([a-z])([A-Z])" to find the changes from lower case to upper case. Put a space between them by replacing the occurances using the pattern "$1 $2".
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa, I think that regular expression would fail to properly parse something like "ThisIsATest" because it wouldn't pick up on two capital letters next to one another. I think something like this would be required to find the word boundaries "([A-Z]|[a-z])(?=[A-Z])". Using a replace of "$1 ".
|
|
|
|
|
That's a good point. I didn't think of the special case of single letter words.
---
single minded; short sighted; long gone;
|
|
|
|
|
Another way would be to :
-Create a character Array of your text using ToCharArray()
-Test each character , if Caps add space before the character and add it to the resulting string otherwise add the character to the resulting string:
<code>
Private Function TransFormText(ByVal oText As String) As String
Dim oResult As String = ""
Dim oArray() As Char = oText.ToCharArray()
For Each oItem As Char In oArray
If oItem. = oItem Then
oResult = oResult & " " & oItem
Else
oResult = oResult & oItem
End If
Next
Return Trim(oResult)
End Function
</code>
|
|
|
|
|
You should however mention that the method scales very badly, so it's only suitable for very short strings.
For a string with 20 characters, it creates 40 string objects to produce the result. Also, for every additional character the memory usage doubles.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: You should however mention that the method scales very badly, so it's only suitable for very short strings.
For a string with 20 characters, it creates 40 string objects to produce the result. Also, for every additional character the memory usage doubles.
sure, But its a good starter.Obviously the poster is a beginner and in such cases its better to provide a solution that is easy to understand and that build up logic...
|
|
|
|
|
Well, at least it increases the traffic to the site when he comes back wondering why the code is getting so f... ehm... extremely slow.
---
single minded; short sighted; long gone;
|
|
|
|
|
There was an error in my previous post:
<code>
Private Function TransFormText(ByVal oText As String) As String
Dim oResult As String = ""
Dim oArray() As Char = oText.ToCharArray()
For Each oItem As Char In oArray
If Char.ToUpper(oItem) = oItem Then
oResult = oResult & " " & oItem
Else
oResult = oResult & oItem
End If
Next
Return Trim(oResult)
End Function
</code>
|
|
|
|
|
I have a couple questions about writing a text file (Most of it know as I've been writing files in this application for quite some time now) but the real question I have is this: I am changing my error log text file to a comma delimited file. The first line with be my headers (Error, Message, Stack Trace, Date/Time) how do I go about only writing this line a single time, then go about adding any errors that may happen below it
"Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean."
Tom Welch
|
|
|
|
|
Write the headers when you create the file :
If Not File exists Then
' Create Log File
'Write Header
Else
' Write Log Row
End If
|
|
|
|
|
Hi, to all.
Mine question is : can i use SQL commands about selecting, sorting and filtering data in VB.Net on DataTables...and which of them can i use
Especially CASE...WHEN...ELSE..END
|
|
|
|
|
Not reall sure what you are wanting to know...You can use ADO.NET to select table from a database using SQL commands if that is what you are talking about?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
You can not use select insert update statements on datatables, rather you can filter your datatable with DataTable.Select(filterexpression as String) method, where filterexpression is like Dept='Administration'.
These filter expression is just like Where clause of Select statements.
Be a part of solution, rather then be a part of problem
|
|
|
|
|
Yes, i was trying to use case.. then .. else .. end statment like in sql in where clause, but i did not make it. Just filtering.
I have some information that there is driver, i guess,thru it is possible to use most of sql statments in vb on datatables. Thank you anyway
|
|
|
|
|
i want to open form2 from menu strip button
Menustrip buttons name is "Preference"
Other button is Exit by which i want to close the application
i want to know its coding plz help me ( (
|
|
|
|
|
to open new form:
dim frmTemp as new Form2
frmTemp.show
to close the application:
Application.Exit()
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
thanx
now i want to make FTP browser
there is no such a option in toolbox
plz help me
|
|
|
|
|
|