|
mates,
how to read the name of a public class.
example.
Public Class frmEntry
i want to put the name frmEntry in my log.txt using log4net.
in log.txt.
what i did in c#.net
private void Page_Load(object sender, System.EventArgs e)
{
log.debug(typeof(frmEntry) +"【Page_Load】*************[Start]")
}
what is equivalent in vb.net
Private Sub frmEntry_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
log.debug(Me.ToString & "【frmEntry_Load】*************[Start]")
EndSub
typeof(frmEntry) in vb.net???? TypeOf(Me) will not work.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
C#Coudou wrote: typeof(frmEntry)
GetType(frmEntry).ToString
|
|
|
|
|
Hi all
I'm new here and new to VB.Net 2008, so forgive my naivety...
I am trying to read the contents of .cbr and .cbz files.
Searching the net I have found UnRARdll.exe but when I try to add the reference in Visual Studio 2008 (VB) it won't accept the DLL as a valid reference.
Any ideas on what I am doing wrong or what I should be using?
I have also ssen the declaration 'imports RARNET' but I can't work out how to find the reference either.
Any help much appreciated. Many thanks in advance...
|
|
|
|
|
You can only set a reference to a .NET or COM-based .DLL. Since the reference won't go, you're trying to set one on a normal library .DLL. The only way to get at the functions of a library .DLL is to use P/Invoke. But, in order to do that, you need the documentation on the functions in the .DLL. Wihtout it, you're just guessing at the parameters you have to setup for each function.
|
|
|
|
|
Dave, many thanks I'll try a work around...
|
|
|
|
|
Hi group,
I have a tree view with eg. following nodes
# People
|
+--# Custumers
|
+-- # Anne Charles, Hillroad 14, 7766 MyTown, My Country
|
+-- # Steve Jones, Forestroad 12, 7766 MyTown, My Country
With the command
Me.treeViewM.Nodes(0).Nodes(0).Nodes(0).EnsureVisible()
I can ensure that "Anne Charles" is visible within the treeview. My problem is: If the treeview is not wide enough to show the complete node text of this node, the horizontal scroll bar is automatically moved to the right so that node structure shown left from the "A" in the text "Anne Charles" is not visible any more. Thus
Anne Charles, Hillroad 14, 7766 MyTown, My Country
Steve Jones, Forestroad 12, 7766 MyTown, My Country
is visible and the node structure is hidden.
Question: How can I ensure that the node "Anne Charles" is visible and also the horizontal scrollbar is aligned to the left, which means that the node structure left from the text is still visible?
Best wishes
Michael
[Visual Basic .net 2005]
|
|
|
|
|
Take a look at this[^]. One of the responses claims to do the trick. Unfortunately the code is C#, but have a look, you may be able to convert it yourself, but if not I'm sure that someone here will be able to help you out.
I have also found this snippet:
SendMessage(treeView.Handle, WM_HSCROLL, SB_LEFT, 0);
This also uses the Windows API, I don't think it is possible without doing that, but there's plenty on the web about the SendMessage API call, you will also need to look up the values for the WM_HSCROLL and SB_LEFT constants.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
modified on Wednesday, April 1, 2009 6:58 PM
|
|
|
|
|
thanks for your hints.
I've found the explanations on
[^]
It solved my problem.
best wishes
Michael
|
|
|
|
|
hi .... everybody
who can give me example of Database + listbox with image or icon
the icon and image within listbox can be checked by people and give the result of database query
garnett
|
|
|
|
|
If memory serves, QuickBooks used to use that technique.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I can use VB.Net or C# .... just what I want
I now estimate the method
please don't post the reply answer of no help
garnett
|
|
|
|
|
This guy has posted the same request in more than one forum.
I have asked him to remove one, and explained the reasons that he should.
He appears not to want to.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I just want to know C# or VB.Net method
so I post to two forum
and plz don't waste time to reply unuseful answer
I only want to know the method that how to do it
garnett
|
|
|
|
|
I found the answer by myself, it uses component called "listbar"
I only want the answer like this , ok ?
garnett
|
|
|
|
|
Hi all,
i have vb.net dll and i used this dll from webbage, i want this dll to display message box through webpage to the client ans open new page contains textbox to get input from user.
please i want urgant help in this point.
Thanks
|
|
|
|
|
Several things wrong with your post:
0: this is the VB.NET forum, your question is about webdevelopment so go to the ASP.NET forum : Correct forum[^] and ask there again
1: every question here is urgent, the people answering however don't get payed so you'll get an answer whenever you get it.
2: from what I can understand from your question, what you are trying to do isn't possible (as far as I know), but ask in the correct forum and people can make better suggestions
|
|
|
|
|
|
Hello friends,
I want to copy a file from one folder to another.
I am using File object.copy to copy the file from one folder to another. How can i make sure that the copy is success or not?
Thanks and regards
Jishith
|
|
|
|
|
If it succeeds, no exception will be thrown, and File.Exists(destination) will return true
|
|
|
|
|
I have a text file that has similar lines..;
i want to count those similar lines and write it as 1 line with a new fieldname Quantity indicating the number of similar lines...
thanks in advance
|
|
|
|
|
Import it in a database and do a SELECT DISTINCT
I are troll
|
|
|
|
|
When handling text files and doing actions on them I always find its best to read the whole text file line by line into a datatable or array or list. Do your actions you need to do on that datatable / array / list and then overwrite the file with a new one.
|
|
|
|
|
i have not used datatable before...
i have no idea about it.
i searched google, but did not get anything useful to do...
any help to import text file into datatable will be mmore helpfull.
thanks for the previous reply and for the future replies...
|
|
|
|
|
From memory :
dim dt as new datatable("a name")
dt.columns.add(new datacolumn("column1",getttype(string)))
dt.columns.add(new datacolumn("column2",getttype(string)))
dt.columns.add(new datacolumn("column3",getttype(string)))
dt.columns.add(new datacolumn("column4",getttype(string)))
...
'now that you have your datatable
'read your textfile line by line
do while not reader.eof
dim dr as datarow = dt.newrow
dr.item("column1")= "your value for that column here"
dr.item("column2")= "your value for that column here"
dr.item("column3")= "your value for that column here"
dr.item("column4")= "your value for that column here"
...
dt.rows.add(dr)
loop
'now you have your entire textfile in a datatable
'you can do all your actions on that datatable now and then overwrite your textfile with a new one
hope this helps
|
|
|
|
|
what tool should i add from the toolbox to use this code???
is it a DataGridView or DataSet or something else.....
i feel like sitting in a dessert where there is nothing available...
my mind is completely blank.....
|
|
|
|