|
For logon problem, see this.[^]
<italic>Work hard, Work effectively.
|
|
|
|
|
im sure its possible to open up a dll during runtime so you can somewhat explore what objects are in it, but how do you do it? ive tried messing around with things in the System.Reflection, mostly with the Assembly object in that, but cant seem to figure it out.
any ideas?
thanks
|
|
|
|
|
It's fairly straightforward, look for the System.Runtime.Reflection namespace. You'll find Assembly.LoadXXX methods to load an assembly. Those methods return an Assembly reference, on which you can call GetTypes() . You can then iterate through the Type array returned by it and display whatever information you want to.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
PeriodAdapter.Fill(DataSet11, "period")
Dim datatable As DataTable = DataSet11.Tables("Period")
Dim dr As DataRow = datatable.NewRow
Dim r() As DataRow = datatable.Select("periodno= max(periodno)")
Dim i As Integer
For i = 0 To r.Length - 1
dr("periodno") = CInt(r(i)("periodno")) + 1
dr("begindate") = DateTimePicker1.Value.Date
dr("enddate") = DateTimePicker2.Value.Date
datatable.Rows.Add(dr)
Next
MsgBox("New period has been saved", MsgBoxStyle.Information, "New Period")
PeriodAdapter.Update(DataSet11, "period")
--------------------------
Well i havent search from internet about this fucntion yet and above code is just what i modify a bit and use for generate new id or number to my record by adding 1. The problem is if there are not records at database, above code cannot add the first record let said periodno =1 ........... and keep giving blank record when i see at my database. if i manually insert periodno=1 then above code can give the next periodno=2.
How to make condition if my database is empty, i tried use Nothing syntax also cannot. What should i do....
|
|
|
|
|
Hi,
first of all: If your periodno is unique you won't need the loop.
To your question: If you don't have any entries in the Period table the Select function will return an empty array:
PeriodAdapter.Fill(DataSet11, "period")
Dim datatable As DataTable = DataSet11.Tables("Period")
Dim dr As DataRow = datatable.NewRow
Dim r() As DataRow = datatable.Select("periodno= max(periodno)")
Dim nextPeriodNo as Integer
If (r.Length == 0) Then
nextPeriodNo = 1
Else
nextPeriodNo = CInt(r(i)("periodno")) + 1
End If
Dim i As Integer
dr("periodno") = nextPeriodNo
dr("begindate") = DateTimePicker1.Value.Date
dr("enddate") = DateTimePicker2.Value.Date
datatable.Rows.Add(dr)
MsgBox("New period has been saved", MsgBoxStyle.Information, "New Period")
PeriodAdapter.Update(DataSet11, "period")
|
|
|
|
|
Hello there
I am creating a folder(s) on the server through my application and want no one to access that folder without providing a password on it. even administrator has to provide the folder(s) password before accessing it.
any idea's
|
|
|
|
|
It is possbile but requires your to write a file system extension. This is NOT easy and requires a deep understand of the internals of NTFS and COM.
Your first step is to order the Windows Device Driver Development kit.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there
I want to build an application which will convert the text into image . I tried through simple Drawing functions and manage to solve it for text files. but as far the word document or html files are concerned it has problem. as Word has some special headers which are not visible in word but are visible if you open them in text file. and in HTML it make an image of source code.
any ideas would be apprciated..
|
|
|
|
|
You'd have to use Word Automation for that. Instead of directly using the doc files generated by Word, you must open them through Word and get their contents. Google for "MS Word Automation" and you should get plenty of help.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I need some help with code or the code for a small string encryption function.
On a command button press, I basically need all the values, either letters or numbers, to be sent to a text file.
I know the App.Path code, and the basic way in which to send text values from text boxes into the App.Path file.
All I need is a way in which to take the characters inside each of the text boxes and encrypt them, and send that info to the App.Path file.
MChr$(Asc(Mid$(Smurg, l, 1)) Xor 7) <--- This sort of thing I believe.
If anyone can post something similar or give me some hints, I'd be greatful.
Thanks in advance,
Smurg.
Smurg.Enabled = True
|
|
|
|
|
hi
i wish to make a form or splash screen that contain Flash
can it be done?
kindly guide me on this...if possible is there any tutorial?
thank you in advance
Gary
|
|
|
|
|
The only way that I can see how do what your asking is by using a browswer object in the form. Generate an html file that can be read by the browser.
Or
Maybe you can interface with the Macromedia API's..........
|
|
|
|
|
|
If this time i enter textbox1.text = "Company Name"
Next time when i open my application the textbox1.text default will be appear that "CoOmpany Name" again and not empty textbox1.text
|
|
|
|
|
You can save that in a file setting or in the registry. The next time your application start, read and show that value.
<italic>Work hard, Work effectively.
|
|
|
|
|
Add this following line into Command button click event or
in LostFocus Event of TextBox:
SaveSetting "ApplicationName", "Section", "Key"
Add this line in form Load Event:
TextBox = GetSetting("ApplicationName", "Section", "Key")
|
|
|
|
|
Can explain it step by step?
thx
|
|
|
|
|
Hi
I think syed saba was clear enoughm but I explain him a little more for you:
Write:
Private Sub Text1_LostFocus()
call SaveSettings( "YOUR APPLICATION NAME", "SAVEDVALUES", "TEXT1VALUE", Text1.Text)
End Sub
Private Sub Form1_Load()
Text1.Text = GetSettings( "YOUR APPLICATION NAME", "SAVEDVALUES", "TEXT1VALUE" )
End Sub
Remember that ANY string that I wrote in CAPITAL LETTERS, is any optional string that you may choose yourself.
need more help?
|
|
|
|
|
I mean the SaveSettings and GetSettings im not really understand it. They are not vb.net default code right? I got it underlined and "name saveSettings is not declared".
|
|
|
|
|
I know how to do this in C or in perl but cannot figure out how to do this in VBscript... Is Vbscript just not robust enough?
I do not know.
I want to execute a simple dir command and read the output. thats it.
I MUST use the console (cmd.exe dir.) in the other languages I know reading from a shell command is simplicity itself vbscript seems to not have this capability.
|
|
|
|
|
On the contrary, it does have this ability and you don't need the console to do it. You need to use the FileSystemObject[^] to return a Folder object, which wil have a Files property that gives you all the files in that Folder.
Dim fso, fldr, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.GetFolder(folderspec)
For Each f in fldr.Files
WScript.Echo "File: " & f.name
Next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Props for teaching me something new, and something that will be useful to me.
What I need however is to go to the console.. i have a very good reason for this but I do not want to go into it just now...
thanks for telling me how to do a directory...
|
|
|
|
|
You made it sound like that's the only way to could get a directory.
But, if that's how you have to do it, great. But, then I don't understand what the problem is. Are you saying you have to read the directory, then output it to the console window? Simple, run your script using CSCRIPT, not WSCRIPT.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
OK here is the deal.
in my place of business we have certain enviornmental settings, some of which can only be called from typing "set" at the command line. i was using "dir" as an example. So I want to do this within a web page...
I click on a button then i get enviornmental settings for that machine on another page or maybe on the page itself... it would not be hard to format the out put to a text file with the proper /etc. then assuming i could open this new page up... I would be golden... i just have thousands of users and computers to support and want to do this a certain way. i could be wrong but i think that this is the only way that will work for us.. (we have to have some rather archaic junk on our systems to communicate with lab equipment etc...)
Sorry if I was misleading.. I just wanted to do this from console... you know?
|
|
|
|
|
Lordahdaring wrote:
n my place of business we have certain enviornmental settings, some of which can only be called from typing "set" at the command line. i was using "dir" as an example. So I want to do this within a web page...
I click on a button then i get enviornmental settings for that machine
Do what? I don't understand this description. Are you talkinga bout getting/setting the environment strings for a client computer from that very same client computer on a web page?
You can get the environment settings, but setting them from a web page is not possible. Code running inside a web brower runs under tight security restrictions and the registry when these environment settings are stored is completely off limits to that code, unless the browsers security restrictions are modified.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|