|
Hi All:
Thank you all for your patience in assisting me with this little project. The Property reply did the trick, and I am happily continuing on my VB programming way! You guys are the best!
DERECK R. PRINCE
President
Roraima Technologies, Inc.
"Customizing Technology for ALL Your Business Needs!"
Saint Louis, Missouri, USA
Phone: 1-314-569-9035
|
|
|
|
|
How to make Intelligent datagrid like yahoo messenger address tab. When we type any word first letter like
In Datagrid Column name is Name it has different name like
Muhammad Waqas Butt
Muhammad Sheraz Butt
Saad Butt
Aarij Butt
So when we type M then it show and select the record and then type u it show only record which are starting from M and second word u.
Any Idea? In C#.Net or VB.Net
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
If you would have a textbox for each column where you enter the string which should be searched for, i would suggest you to use the textchanged event of that textboxes. you could go through each row of the dataset which is stores the information and check if the specific column contains the string which you're searching for and if it does, copy that row to a second dataset which is binded to the datagrid. although it would work, its a bad idea, since you would have to use two datagrids or something like this to store the original informations, and the ones which should be shown. you also would have to go through the whole table everytime someone writes something. thats not a problem if you're using a small datagrid, but if it gets larger, you will get performance problems...
just some suggestions because nobody answered yet, no good ones though :/
good luck,
mik
|
|
|
|
|
I am building a VB.Net Windows application. I would like to allow the user to click a button which will open their default mail client, insert the subject, body, and emaill addresses, and then attach one or more files. The user would then be able to change any of the information and send their their email client.
I've seen several posts that suggest using the "mailto:" command with ShellExecute seems to be the easiest wayto go, however this does not seem to support attachments. I've also seen several posts that suggest using MAPI to accomplish this, but those all seem to be VB6 (It doesn't seem to be available out of the box with VB.net).
There is also functionality that I could use for Outlook specifically, however I want to keep this fairly generic so that other email clients could be used as well.
I would greatly appreciate any suggestions.
|
|
|
|
|
I'm trying to figure out how to select an an item in in a listview at runtime
e.g. searching a listview (in detail view) for a specific item and highlighting it
I've tried:
listview.items(i).selected = true
where i is the index of the item i want to select - the item is added to the listviewselecteditems collection, but it does not highlight. Do I need to refresh the control after selecting it, or is some extra handling in the paint event needed?
Dave
|
|
|
|
|
Ha!
Just managed to answer my own question -
remember to add:
listview.items(i).selected = true
listview.select()
many thanks to Jason Heine for his article...
My new motto: think twice, speak once
Dave
|
|
|
|
|
Hi
I tried to get some printer-informations by using a wmi-query. It works fine until a printer goes offline. It takes very long to get those informations then.
What do i want it to do?
- It should be much faster to get the printer-informations (about 3 secs, no matter whether a printer is offline or not)
OR
- It should run the application.doevents() command at least every second. (to provide a progressbar which is worth to be called a PROGRESSbar
What did i already try to do?
- Optimize the WMI-Query (which was a bit successful at least)
- Set a seperate Timer which runs the application.doevents() command (for the possibility of a progressbar, which shows that the computer doesn't hang around)
The Query-optimization increased the speed by 1-2 seconds. but it still took too long to get the printer-informations.
The timer freezes if the specific line of code is executed (if all printers are online its about 3secs, if only one of the printers is offline, it takes up to 15 secs and more), so that's not the solution, too.
All together: very unsuccessful
I will show you some example code, so you may rebuild the problem, if you're interested in
Declaration/Definition of variables:
<br />
Private Printer As System.Management.ManagementObject<br />
Private PrinterSelect As New Management.SelectQuery("SELECT Name, PrinterStatus, DriverName, PortName, Comment, Local, Network, Default FROM Win32_Printer")<br />
Private PrinterSummary As New Management.ManagementObjectSearcher(PrinterSelect)<br />
Private PrinterCollection As Management.ManagementObjectCollection<br />
executing code:
<br />
PrinterCollection = PrinterSummary.Get()<br />
'Application.DoEvents()<br />
For Each Printer In PrinterCollection<br />
{...}<br />
Next Printer<br />
PrinterCollection = Nothing<br />
everytime the third line of executing code ("For Each Printer in PrinterCollection") being executed, the computer starts to hang.
please tell me, if you need more informations about the problem.
i would be thankful and pleased for every constructive response
so far,
mik
|
|
|
|
|
|
Great. It works fine. Now i'm able to make the progressbar be a real progressbar which shows continously progress thanks a lot, wouldn't have get that by myself.
here's some example code how it could look like:
declaretion/definition:
Private Printer As System.Management.ManagementObject
Private PrinterSelect As New Management.SelectQuery("SELECT Name, PrinterStatus, DriverName, PortName, Comment, Local, Network, Default FROM Win32_Printer")
Private PrinterSummary As New Management.ManagementObjectSearcher(PrinterSelect)
Private PrinterCollection As Management.ManagementObjectCollection
Private observer As New Management.ManagementOperationObserver
Private completionHandler As New WMICompletionHandler
executing code:
PrinterCollection = Nothing
PrinterSummary.Get(observer)
PrinterCollection = PrinterSummary.Get()
While Not (completionHandler.IsComplete)
Application.DoEvents()
System.Threading.Thread.Sleep(500)
End While
For Each Printer In PrinterCollection
{...}
next printer
... it redraws the progressbar while executing the wmi query, too.
you need to add the completionhandler class, shown on that msdn page.
thanks again
|
|
|
|
|
I wanna ask easier way for an T-SQL Clause
Imagine a table AS following
CODE - TYPE - TOTAL<br />
1132 IN 100<br />
1134 IN 140<br />
1134 OUT 230<br />
1135 IN 240<br />
1135 OUT 50<br />
1136 IN 70<br />
1137 OUT 110
I need a sqlclause it will group by code and calculate Total, u have to multply OUT type with -1
the final table what i need to get is
CODE - TOTAL<br />
1132 100<br />
1134 -90<br />
1135 190<br />
1136 70<br />
1137 -110
I assume The clause like that
select CODE,SUM(If (TYPE='OUT',TOTAL*-1, TOTAL) from DETAILS<br />
group by CODE,TYPE Order by CODE
But something is missing
-- modified at 9:24 Monday 5th September, 2005
|
|
|
|
|
The correct sentence is:
select CODE, TOTAL = SUM(case when TYPE = 'OUT' then TOTAL * -1 else TOTAL end) from DETAILS
group by CODE Order by CODE
Regards,
Vidal Gutiérrez Ch.
|
|
|
|
|
|
hcmuns wrote:
Could you tell me what books like Real World .NET Application book
You want other books like this one ? Why not go to amazon.com and see what else they recommend ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I want to rotate the label control.I have searched but i have only got the solution to rotate the text appear on the label. So if anybody could help me in this regard then it will be pleasure for me.
Thanks
Premanand Jha
|
|
|
|
|
Have a look at:
http://www.codeproject.com/useritems/Vertical_Label.asp
it may be of help.
Bye
Briga
|
|
|
|
|
Hi
I am getting a error "Specified argument was out of the range of valid values.Parameter name: '-2147483648' is not a valid value for 'index'." When I was trying to set selected value property value for the combo box.
I have given the code for your reference.
With cboName
.DataSource = dtSource
.DisplayMember = strDisplayMember
.ValueMember = strValueMember
End With
cboName.SelectedValue = intCalibrateId.ToString
After binding the combo box member, I am setting the value to the selectedValue property.
Please findout where I have done a mistake and how to rectify this.
Thanks in advance
M. Rabeek Ahamed
|
|
|
|
|
hmm
Try out by putting the Selectedvalue property int he With-EndWith block
like,
With cboName
.DataSource = dtSource
.DisplayMember = strDisplayMember
.ValueMember = strValueMember
.SelectedValue = intCalibrateId.ToString
End With
If this doesnt work than check out for the intCalibrateId value....
and try without casting it to string.
_mubashir
|
|
|
|
|
Hi frends!
Im currently working on a project that should display a number of columns on a datagrid. However i've 2 columns in my database that are named "inbound" and "outbound" and have binary values; 1 if yes and 0 if no. Both cannot be "1" at the same time but both can become "0".
Well i got stuck right about there...what i did was i excluded those 2 columns from the grid and created 2 radio buttons for each. Wat i want to do now is when i click on, for example, "inbound" it only displays the rows which has "1" value in their inbound columns.
The simple and most obvious question is...how do i go about doing this?
Thanx for all your assistance!
Kampai!!!
|
|
|
|
|
You can filter your datasource dynamically, but in this case, it would be quicker to return three tables in your dataset, one with all records, and one for each of the two values, where it is true. Then you can rebind against the right table when someone clicks a radio button.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Short yet precise n accurate...thanx chris!
Kampai!!!
|
|
|
|
|
Problems:
(1) How to get dynamic “Crystal Report” data I mean I have 3 tables named as Job, JobDesc and Emp_Info’ there is a primary key name JobNo now I want that I pass sqldb command at run time and in where clause I pass the JobNo so then on the crystal report only data show which have given JobNo.
(2) How to set Multi-line Report in Crystal Report Detail Section. Like this:
(3) How to display custom date format (Sep-06-2005) in Crystal Report.
Job No Title Employee Id
_____________________________________________________
1 Dummy Dummy Title Dummy Title 001
2 Dummy Title Dummy Title Dummy 002
sdfshdkfsdhkfshdkhs
3 Dummy Title Dummy Title Title 003
_______________________________________________________
I mean which property I have to change in order to get this kind of look.
Sample code can be fine at:
http://sktech.freewebspace.com/My%20Problems/[^]
Yours sincerely,
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
I have a Multi Line Textbox. User will input address information.I wantta set cursor to new line, when user press enter key. I try following code to achive but it always set cursor to first line. what do u offer me :S
protected sub txtAddress_KeyUp(........) handles txtaddress.keyup<br />
if e.key= keys.enter then <br />
txtaddress.text &= envoirenment.newline<br />
endif<br />
end sub
-- modified at 4:17 Monday 5th September, 2005
|
|
|
|
|
You're doing it the hard way. Why not just set the AcceptsReturn property of the TextBox to True? It'll accept the Enter key as a newline by itself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I solve problem : AcceptReturns=TRUE is OK
|
|
|
|
|
hello all,
any one know, how to develop OCR in VB.NET
thanx
|
|
|
|