|
how can i make form once show,if i create programs licenced.
|
|
|
|
|
|
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser
so pleaaaasee help me with a project sample
and pleeeaaase let me know how would my program reads these files to use them. how 
|
|
|
|
|
|
This is my thread in msdn forms and nothing helps there...
|
|
|
|
|
"Use a zip file and change the extension"
That does not help you? That is quite a common way nowadays.
Ever tried it the other way round, with say a .docx? Do that! Rename a Word document to a zip file, and unzip it!
|
|
|
|
|
Alsayed web wrote: sorry I have no code because I'am a looooooooser
That's no way to introduce yourself. You got the same type of brain that I have, and you probably run on water and sunlight like the rest of us.
Use a database (like SQL CE or SQLite), encrypt the contents and rename the extension to ".dat". Use a folder, zip it and rename the zipfile to ".dat". Use an Xml file, and store the other files in Base64-encoding, and rename it to ".dat".
Let's start simple; can you post the code here to write the line "Hello world" to a file? If not, that's where to start
Bastard Programmer from Hell
|
|
|
|
|
These select quotes from the thread of yours @ MSDN says it all:
Alsayed web wrote: and please don't say what should I do, just give me a link or a code
Cor Ligthert (MVP) wrote: Why don't you simple say, don't say what should I do, just make and sell it for me and give me the money.
Riced(FWSR) wrote: It's not a duplicate(thread) but a triplicate(thread). Also posted on CodeProject because he cannot get an answer here. LOL
Quote from CodeProject reply when I pointed him here: "This is my thread in msdn forms and nothing helps there..."
|
|
|
|
|
If you want to do it through your own code, use a FileStream to read the files into memory and another to write them to the same file. FileStreams read the raw bytes of the files. You'll want to put some sort of delimiter between the files so you can separate them later. To add your delimiter to the file, create a string and then use System.Text.Encoding.Ascii.GetBytes(YourStringVariable). That will give you a byte array with which to write with the filestream's write method.
Hope that wasn't too confusing!
Ray
PS: If you want to compress your files, there are lots of examples for compressing files in .NET, just search google for "compression vb.net"
|
|
|
|
|
I have a question about how to do the following and the pros and cons about doing either.
I have a class that I want to be able to log some activities, such as "function has been called". I could define an event call CurrentInfo(byval infoType as Integer,byval message as String), and then let the logger subscribe to the event and do whatever, or I can pass a logger to the class and whenever I wanted to log something I will call "logger.log(infoType, message)"
Which appoarch is better?
Thanks
|
|
|
|
|
instantmaker wrote: Which appoarch is better?
That depends on your definition of "better". I'm using an ILogger, sometimes writing to console, sometimes to the eventlog, and a null-implementation of the ILogger (doesn't log anything). The logger-object is static, so it doesn't need to be passed as a parameter to each and every method.
Might not be the "best" approach, but works for me
Bastard Programmer from Hell
|
|
|
|
|
Thanks for the answer. I know it's relative and is different from one to the other scenarios. I found that, as you said, if I don't need a logger from time to time I will have to pass a null logger to the class. Yet event can be hooked up dynamically as needed.....I really want to know is there a big PLUS to use logger instead of using events. Thanks
|
|
|
|
|
instantmaker wrote: I will have to pass a null logger to the class
You don't have to, you could also test whether the user has a boolean checked to control if the app logs or not. The null-logger a common pattern because it's convenient.
instantmaker wrote: I really want to know is there a big PLUS to use logger instead of using events.
Requires less code. How would you do it with events? Raising an event for everything that you might want to log? Can you post an example?
Bastard Programmer from Hell
|
|
|
|
|
I was woundering if anyone knows any codes for a Rehash and Resign Program? It might have.... 2 buttons or 3 if it will have rehash and resign as one button then rehash as a button and resign as a button.
it should have atleast 5 textboxes ....
|
|
|
|
|
You seem to want to modify a saved game then re-hash it?
No, you're not going to get any help with that here. I think the reasons are quite obvious.
|
|
|
|
|
Thanks Anyways Figured i would still give it a try to ask about it on here.
I've Figured it out after a few hours plus using my Visual Basic Guides as help but the code words on First use then Gives me an Error .... so i set the Program to Restart so as to NOT get the error but if anyone can help with THAT it would be GREAT Thanks anyone who can help if you need that part of the Code just ask and ill give.
Im NOT going to Delete that part of Code to NOT get the errors....
|
|
|
|
|
Member 8768189 wrote: I've Figured it out after a few hours plus using my Visual Basic Guides as help
OK. What guides are you talking about??
Member 8768189 wrote: but the code words on First use then Gives me an Error
Still not a clue what you're talking about.
Member 8768189 wrote: so i set the Program to Restart
Since there's no property or method to "restart" an application, we STILL don't have a clue what you're talking about.
Member 8768189 wrote: so as to NOT get the error
You never said WHAT error you got, not what the code looked like, so, uhhhh, yeah, more of the same "we don't have a clue what your talking about"...
Member 8768189 wrote: Im NOT going to Delete that part of Code to NOT get the errors....
WHAT code?? That does WHAT?? Again, you haven't provided us the smallest of clues to figure out what you're talking about...
|
|
|
|
|
im sorry to all the people i confused. i was working on that Rehash and Resign Program for days and was annoyed at the one error i kept getting no matter what i did. i figured it out after reading ALOT of microsoft Visual Basic Guides and other Random guides like those and VB Code cook books ... well i used bits of codes here n there from a few different guides and some of my own codes and got my rehash and resign program .
thank you all for being here even when i was stupid about how i worded things and i was not online alot which im also sorry for... its just im stuck with dial-up when i do get online 90% of the time....
the results of my program are great but it can be better. if anyone has made a program similar to mine you might wanna check it out when i post it.
To clear up the title confusion i ment to put "Rehash and Resign Program" and what it does is "Rehash and Resign Xbox 360 game save files" ....
ill post the old code on here later (the code i got stuck on with errors) in case anyone would like to play with it.
[solved]
-- modified 16-Jun-12 8:58am.
|
|
|
|
|
Protected Sub btnReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReport.Click
Dim dtbTable As DataTable = New DataTable
Dim strSQL As String
Dim adtSelect As SqlDataAdapter
Dim srt1`As String
srt1`= TextBox1.Text
strSQL = "select * from table1"
adtSelect = New SqlDataAdapter(strSQL, conDB)
adtSelect.Fill(dtbTable)
gridview.DataSource = dtbTable
gridview.DataBind()
Catch ex As Exception
Response.Write(ex.Message.ToString)
Finally
conDB.Close()
End Try
End Sub
Protected Sub gridview_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gridview_PageIndexChanging
gridview.PageIndex = e.NewPageIndex
gridview.DataBind()
End Sub
|
|
|
|
|
Please refer to this http://www.codeproject.com/Messages/1278601/How-to-get-an-answer-to-your-question.aspx[^] for tips on how to ask a question.
This is just an unformatted code dump that everyone will just ignore.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
i have a code in mikrobasic to send some certain data to my pc for some purpose by Bluetooth module rn 42
but the problem is the data when im receive it and display it its too different from data in my code
whats the problem why data change ????
|
|
|
|
|
Without seeing your code and the data (both sent and received), nobody will be able to guess what is happening. Please see here[^] for hints on writing a question.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
im used direct commands in NXT to control robot
i send the bytes from Bluetooth module rn 42
and this simple code to let data play tone
i write code in mikrobasic
but robot dont make beeeb voice but the BT is connectet because the color of its led is green
program test_
DIM byteOut AS BYTE[9]
DIM i AS BYTE
main:
Usart_Init(9600)
byteOut[0]=$06
byteOut[1]=$0
byteOut[2]=$80
byteOut[3]=$03
byteOut[4]=$FF
byteOut[5]=$0
byteOut[6]=$64
byteOut[7]=$0
byteOut[8]=$0
while true
for i = 0 to 8
USART_Write (byteOut[i])
next i
DELAY_MS(3000)
wend
END.
thanks in advance
|
|
|
|
|
<pre lang="vb"></pre>im used direct commands in NXT to control robot
i send the bytes from Bluetooth module rn 42
and this simple code to let data play tone
i write code in mikrobasic
but robot dont make beeeb voice but the BT is connectet because the color of its led is green
program test_
DIM byteOut AS BYTE[9]
DIM i AS BYTE
main:
Usart_Init(9600)
byteOut[0]=$06
byteOut[1]=$0
byteOut[2]=$80
byteOut[3]=$03
byteOut[4]=$FF
byteOut[5]=$0
byteOut[6]=$64
byteOut[7]=$0
byteOut[8]=$0
while true
for i = 0 to 8
USART_Write (byteOut[i])
next i
DELAY_MS(3000)
wend
END.
thanks in advance
|
|
|
|
|
error vbc30205 i.e end of statement eepected occur please help me anyone
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Textchanged = "hello from visual basic"
End Sub
End Class
|
|
|
|