|
Only if you ownerdraw the combobox control and supply the drawing code to do it.
|
|
|
|
|
Roger. I figured that was going to be the answer, just wanted to make sure I wasn't overlooking something silly.
thanks.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi..
I need to enter data in a TextBox,send it to a Access database & check whether the data I entered & the data in a DataField(such as a Name) in that DB are same.If they are same I need to go to the next statement(such as a messgebox).
I tried lots of time to do this,but unfortunatly still I unable to do it.
If you can please give me the codes for that or give me some reference details for that.
** I'm usind VB 6
Thanks a lot !!!
Thanking you !!!
~ Sathish Chandimal ~
|
|
|
|
|
There are tons of examples and discussions out on the web. All you have to do is search[^]. BTW, VB6 is officially a dead language and has been for quite a while now. The next version of Windows will not support its runtime. I highly suggest getting VB.NET. You can get the Express Edition (free) from here[^].
|
|
|
|
|
Hi,
I'm developing a utility where I need to provide permission to a directory for a particular user. I'm writing this utility in VB.Net and need your help in this part. I'm able to write a code to provide file level permission and I don't know how to assign for directory.
Thanks,
Vidhya Sagar
|
|
|
|
|
Check out this[^] article. The code is in C#, but is easily translated to VB.NET.
|
|
|
|
|
pls help me its urgent
i m facing a problem with my vb.net code
this is the code equivalent in c#
this is a interface........
...............................................................................................................
namespace x
{.
public interface ISection
{
string UserControl
{
get;
}
string SectionId
{
get;
}
bool Delete();
void SaveData();
List<searchresult> Search(string searchString, WebPage page);
}
................................................................................................................
and in another class file this interface 'isection' is used like this
namespace x
{
public class Sidebar
...................................
...............
public static bool GetSectionRss(XmlWriter rss, ISection section, string pageId, string TitlePrefix)
{
if (section != null)
{
ChannelData SectionChannel = ((ISidebarObject)section).GetSidebarRss(pageId);
string TypeName = section.GetType().ToString();
...............................................................
............................................
}}}
it is working in C#
but when i chane the code into vb.net
i m getting a error message in
dim TypeName as string =section.[gettype]().Tostring()
i tried to use dim TypeName as string =section.gettype()
but i cannot type like it
later i know that type of a interface cannot getthrough GetType()
but i want to get the type of that interface................
pls help me ,tell me another method for it.
thanks in advance.....................
|
|
|
|
|
Hi,
an Interface has a GetType() method, even in VB.NET
don't let Intellisense fool you (there may be a custom/all button that hides some).
|
|
|
|
|
thanks for ur answer
but anyway if i use like this ie interface.[gettype]() it shows an error that gettype is not a member of interface.
|
|
|
|
|
Imports System
Module Module1
Interface ISomething
Sub fDouble()
End Interface
Class Whatever
Implements ISomething
Sub fDouble() Implements ISomething.fDouble
Console.WriteLine("whatever")
End Sub
End Class
Sub Main()
Dim some As ISomething = New Whatever
Console.WriteLine(some.GetType().ToString())
Console.ReadLine()
End Sub
End Module
I suggest you buy an introductory book on VB.NET and study it...
|
|
|
|
|
Dear Experts ,
How to enable mdi menus at runtime depending upon the access rights to user after login.
I have a table in sql server 2000 as
select menuid from user_rights where userid = id
result : 1,3,5,10,15
now in mdi, in menustrip, for each toolstripmenuitem, i have mentioned a menuid in tag property.
I'm new to vb.net
Kindly advice , Thanks in Advance
|
|
|
|
|
You can use Condition statements.
|
|
|
|
|
in vb 6.0 what i used to do was like this :
If rs.State = 1 Then
rs.Close
End If
qry = "select menu_id from user_rights where user_id = '" & id & "' order by menu_id"
rs.Open qry, conn, adOpenDynamic, adLockOptimistic
While rs.EOF = False
For Each m In Me
If TypeOf m Is Menu Then
If Trim(m.HelpContextID) = rs(0) Then
m.Enabled = True
rs.MoveNext
End If
End If
Next
Wend
can i get to do something similar in vb.net 2005 ?
Thanks for reply
|
|
|
|
|
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & System.Windows.Forms.Application.StartupPath & "\phonebook.mdb;"
cn.Open()
Str = "select menu_id from user_rights where user_id = '" & id & "' order by menu_id"
rs.Open(Str, cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)
While rs.EOF = False
For Each m In Me
If TypeOf m Is Menu Then
If Trim(m.HelpContextID) = rs(0).Value Then
m.Enabled = True
rs.MoveNext
End If
End If
Next
Wend
What ever you gave I'll convert to vb.net with your same format
|
|
|
|
|
Ok,
i'm using vb.net 2005 and sql server 2000
i'll keep chking for ur reply.
Thanks a lot
|
|
|
|
|
I'm not able to find how to do this...!
I'll explain about the requirement..
i have a table in sql2000 which has col username and id(this id i want to match to tag property of toolstripmenuitem)
in vb.net2005, i have one menustrip in mdi, where for each toolstripmenuitem there is a tag number .
now i want to disable all the menuitems and subitems at first and then enable only those items which match the id as per the username in table .
I hope this is clear.
Kindly help !
|
|
|
|
|
How caan I read multiple rows using dr in vb.net having ms access as database?
|
|
|
|
|
You can loop through the DataReader and check for records.
While DataReader.Read()
|
|
|
|
|
Hello All,
Am developing small Employee Data Entry system For Our employees. am Using Vb.net and vb code for that, I want to Know some Picture capture techniq, ie in runtime i want to capture the employee Photo by a digital camera it should automatically Saved locally in that system. Is it possible through a picture box control. Please advice..
Thanks
Riz
|
|
|
|
|
You can look into WIA, it can be used to tell most cameras to take a pic. Or you can look at the Canon SDK and my wrapper class ( it's a CP article ), but in that case, you need to buy a camera on ebay, none of the supported cameras on the SDK version I worked with, are still commercially available.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thanks For your speedy reply. would you please give me suggestion or website results for that cause am searching in wikipedia site for WIA, I dont get the meaning.Cause am using windows Vista OS in my system. How can i work with WIA through VB.net Can you suggest some thing like sample Programs etc. If possible please help me.
Thanks
|
|
|
|
|
Google for "Windows Image Acquisition".
|
|
|
|
|
What's[^] so hard about it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I am working at a project in VB.net where I have to populate a listview (detail) with names and different colors for each item (color depending on status of name)
The project is has to be a part of a program written in C#.
When I use my code in a program completly in VB.Net all works fine. I can see de wanted colors. But in the project that is part of the C# programm all I get is the color chosen in the properties of the listview.
Also the toolstripbar is in desingmode blue, but when I run the program it is the windowcolor.
Is there a setting in C# that makes that the coloring dosn't work ?
Thanks
|
|
|
|
|
I imagine you need to mark the box as owner drawn.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|