Jx_Man 987 Nearly a Senior Poster Featured Poster

try this following code :

{********************************************
  * This Procedure to Sort element vektor *
  * Procedure ATUR to organize an element position *
 ********************************************}
 procedure QUICKSORT (var A : Larik;
                          Awal, Akhir : integer);
 var I,J : integer;

 procedure ATUR;

 begin
 
   I := Aw + 1;
   J := Ak;

 
   while A[I] < A[Aw] do inc(I);


   while A[J] > A[Aw] do dec(J);
   while I < J do

     begin
       TUKARKAN(A[I],A[J]);
       while A[I] < A[Aw] do inc(I); {*To Right*}
       while A[J] > A[Aw] do dec(J); {* TO Left*}
     end;
   TUKARKAN(A[Aw],A[J])
 end;              
 
 begin
   if Aw < Ak then
      begin
        ATUR;
        QUICKSORT(A,Aw,J-1);
        QUICKSORT(A,J+1,Ak)
      end
 end;

Hope this helps...

Jade_me commented: great :) +1
Naruse commented: worked +1
Vega_Knight commented: :) +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

yeah. i will give u QuickSort procedure

Jx_Man 987 Nearly a Senior Poster Featured Poster

you must to declare what is SW_SHOWNORMAL.

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_HIDE = 0
Private Const SW_MAXIMIZE = 3
Private Const SW_MINIMIZE = 6
Private Const SW_RESTORE = 9
Private Const SW_SHOW = 5
Private Const SW_SHOWDEFAULT = 10
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_SHOWNOACTIVATE = 4
Private Const SW_SHOWNORMAL = 1

Private Const ERROR_FILE_NOT_FOUND = 2&
Private Const ERROR_PATH_NOT_FOUND = 3&
Private Const ERROR_BAD_FORMAT = 11&
Private Const SE_ERR_ACCESSDENIED = 5            '  access denied
Private Const SE_ERR_ASSOCINCOMPLETE = 27
Private Const SE_ERR_DDEBUSY = 30
Private Const SE_ERR_DDEFAIL = 29
Private Const SE_ERR_DDETIMEOUT = 28
Private Const SE_ERR_DLLNOTFOUND = 32
Private Const SE_ERR_NOASSOC = 31
Private Const SE_ERR_OOM = 8                     '  out of memory
Private Const SE_ERR_SHARE = 26

Private Const STYLE_NORMAL = 11
Sawamura commented: thanks for declaration +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

first you must know the type and patern of prime number :
Hope the following code is solved your problem :

Private Sub PrimeNumber(ByVal Low As Integer, ByVal Up As Integer)
        Dim i As Integer
        For i = Low To Up
            If (i = 2) Or (i = 3) Or (i = 5) Or (i = 7) Then 
                ListPN.Items.Add(i)
            Else
                If (i Mod 2 <> 0) And (i Mod 3 <> 0) And (i Mod 5 <> 0) And (i Mod 7 <> 0) Then
                    ListPN.Items.Add(i)
                End If
            End If
        Next
 End Sub

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ListPN.Items.Clear()
        PrimeNumber(txtLower.Text, txtUpper.Text)
End Sub

Hope this helps.
don't forget to give feedback

Jx_Man 987 Nearly a Senior Poster Featured Poster

google, search for enterprise edition

Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

do like debasisdas said.

Jx_Man 987 Nearly a Senior Poster Featured Poster
Jx_Man 987 Nearly a Senior Poster Featured Poster

use media player control to play mp3 file.

Jx_Man 987 Nearly a Senior Poster Featured Poster

as ryan said look in controls propeties, the minor one of tab index value will get focus.
ie : text1 - tabIndex = 0 -> this control will get focus
text2 - tabIndex = 1 -> focus after text1
....
or see where the cursor flicker when it run.

Jx_Man 987 Nearly a Senior Poster Featured Poster

well, great link friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

HI...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

manifest file is easiest way.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Juan Borrero...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Vinay...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Grinch... Welcome to Daniweb :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

the easiest way is save the path of image and save it into database. when you want to display it, you will call the file name of image.

Jx_Man 987 Nearly a Senior Poster Featured Poster

try this code :

Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Const SND_ASYNC = &H1
Const SND_LOOP = &H8
Const SND_MEMORY = &H4
Const SND_NODEFAULT = &H2
Const SND_NOSTOP = &H10
Const SND_SYNC = &H0

Private Sub cmdPlay_Click()
Dim Result As Long
Dim SoundFile As String

'  set file name
SoundFile = "C:\DÖNALd.wav"

'  Play wave file 
Result = sndPlaySound(SoundFile, SND_ASYNC)

End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Barbie :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

oh, you was done. great.
don't forget to mark this solved.
happy coding friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

use package & deployment wizard on microsoft visual studio tools.
start program -> Microsoft Visual Studio 6.0 -> Microsoft Visual Studio 6.0 tools -> Package & Deployment wizard.

Jx_Man 987 Nearly a Senior Poster Featured Poster
'5 command buttons:
'cmdRestart; cmdLogOff; cmdForceLogOff; cmdShutdown; cmdForceShutdown

Option Explicit
Private Const EWX_LogOff As Long = 0
Private Const EWX_SHUTDOWN As Long = 1
Private Const EWX_REBOOT As Long = 2
Private Const EWX_FORCE As Long = 4
Private Const EWX_POWEROFF As Long = 8


Private Declare Function ExitWindowsEx Lib "user32" _
(ByVal dwOptions As Long, _
ByVal dwReserved As Long) As Long

Private Type LUID
UsedPart As Long
IgnoredForNowHigh32BitPart As Long
End Type

Private Type LUID_AND_ATTRIBUTES
TheLuid As LUID
Attributes As Long
End Type
Private Type TOKEN_PRIVILEGES
PrivilegeCount As Long
TheLuid As LUID
Attributes As Long
End Type

Private Declare Function GetCurrentProcess Lib "kernel32" () As Long

Private Declare Function OpenProcessToken Lib "advapi32" _
(ByVal ProcessHandle As Long, _
ByVal DesiredAccess As Long, _
TokenHandle As Long) As Long


Private Declare Function LookupPrivilegeValue Lib "advapi32" _
Alias "LookupPrivilegeValueA" _
(ByVal lpSystemName As String, _
ByVal lpName As String, _
lpLuid As LUID) As Long

Private Declare Function AdjustTokenPrivileges Lib "advapi32" _
(ByVal TokenHandle As Long, _
ByVal DisableAllPrivileges As Long, _
NewState As TOKEN_PRIVILEGES, _
ByVal BufferLength As Long, _
PreviousState As TOKEN_PRIVILEGES, _
ReturnLength As Long) As Long

Private Declare Sub SetLastError Lib "kernel32" _
(ByVal dwErrCode As Long)

Private Sub AdjustToken()

Const TOKEN_ADJUST_PRIVILEGES = &H20
Const TOKEN_QUERY = &H8
Const SE_PRIVILEGE_ENABLED = &H2

Dim hdlProcessHandle As Long
Dim hdlTokenHandle As Long
Dim tmpLuid As LUID
Dim tkp As TOKEN_PRIVILEGES
Dim tkpNewButIgnored As TOKEN_PRIVILEGES
Dim lBufferNeeded As Long

SetLastError 0

hdlProcessHandle = GetCurrentProcess()

OpenProcessToken hdlProcessHandle, _
(TOKEN_ADJUST_PRIVILEGES …
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

i was modified your code, i add two event handling in keypress event :

Public Class Form1
'This code not allowed you entered numeric input
Private Sub txtFirstName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtFirstName.KeyPress
        If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _
              Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _
              And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _
              Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then
            'space accepted
            If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then
                e.Handled = True
            End If
        End If
        If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) _
       Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 44) _
       Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 45) _
       Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 46) Then
            e.Handled = False
        End If
    End Sub
	
'This code not allowed you entered numeric input
Private Sub txtLastName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtLastName.KeyPress
        If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _
              Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _
              And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _
              Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then
            'space accepted
            If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then
                e.Handled = True
            End If
        End If
        If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) _
       Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 44) _
       Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 45) _
       Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 46) Then
            e.Handled = False
        End If
    End Sub
	
Private Sub btnCalcCost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalcCost.Click
        Dim numMonths As Integer
        Dim decTotalCost As Decimal
        Dim memCost As Integer
        Dim singleMem As Decimal = 38D
        Dim FamilyMem As Decimal = 58D
        Dim seniorMem As Decimal = 27D



        If IsNumeric(Me.txtNumberOfMon.Text) Then numMonths = Convert.ToInt16(Me.txtNumberOfMon.Text)

		
		If txtfirstName.text = "" Or txtLastName.text = "" Then
            MessageBox.Show("Error")        
		else
			If numMonths > 0 Then
				If Me.radSingleMem.Checked Then
					memCost = singleMem …
shannonpaul commented: We need more programmers Jx_man. Always willing to help someone that is eager to learn. +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

your just have 1 column and index is 0.
selectedItems(0) -> selected item on column 0
selectedItems(1) -> selected item on column 1

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Alan...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Jim...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Seelie...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Peter... Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi CuberAngel... Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi... Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi... Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

- divided in module/function, so u just call the function or module.
- Reusability
- Resilience to change
- Encapsulation, Abstraction, Inheritance and Polymorphism

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think crystal report have a function for sum or avg.

Jx_Man 987 Nearly a Senior Poster Featured Poster

and don't forget to stop a server for a while when you want to backup data cause it will give you an error.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Manually you can stop the server copy the data files and then restart the server..

yeah, i do this way if i want to backup my database. i think this is a simple way.:)

Jx_Man 987 Nearly a Senior Poster Featured Poster

well, i don't know what i have to say. but maybe i can say "Nice to Know you Friend"...:D

Jx_Man 987 Nearly a Senior Poster Featured Poster

Fail:
Awarded to any student who scores either
-a total score less than 15
- less than 5 in two or more assignments
o High Distinction:
Awarded to any student who has both
- A total score greater or equal to than 23
- Not scored less than 5 in any assignment
o Pass:
- Anyone who has not scored a Fail or High Distinction

i confused with your if statment !!!
this a condition if not wrong :
* Fail
- TotalScore < 15
- (Ass1 + Ass2) < 5 or (Ass1 + Ass3) < 5 or (Ass2 + Ass3) < 5 or (Ass1 + Ass2 + Ass3) < 5

* High Distinction
- TotalScore > 23 --> it could be 24,70, 100 or greater
- Ass1 or Ass2 or Ass3 > 5

* Pass
- Anyone who has not scored a Fail or High Distinction???
how it could be??not scored a Fail or High Distinction??
- in condition of High Distinction, TotalScore > 23 (-> 24, 50, 70, 100 ... and greater than 23) so what a condition for pass? whether who get HighCondition is pass?

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome...
happy coding :D

Jx_Man 987 Nearly a Senior Poster Featured Poster

yes, you right.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome friend :)

Vega_Knight commented: welcome guy +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Ok. this my connection code.
and don't forget to add the procedure name if you want to call every function that it has connection to database.

Global Conn As ADODB.Connection
Global rs As ADODB.Recordset

Sub Access_Connector()
    Set Conn = New ADODB.Connection
        Conn.Provider = "microsoft.jet.oledb.4.0"
        Conn.CursorLocation = adUseClient
        Conn.Open App.Path & "\SIS.mdb"
End Sub

Hope this helps.

Jx_Man 987 Nearly a Senior Poster Featured Poster

where of South East Asia??

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi SubProf... Welcome to Daniweb friend :)
i think you post thread in wrong forum..
this forum for vb not for c#...
please post in current forum -> C#

Jx_Man 987 Nearly a Senior Poster Featured Poster

please see my code :
there are something wrong?how i can check if stack is empty??
NB : isi = content of stack
atas = top of stack
tumpukan is stack

function POP (var T : Tumpukan) : integer;
 begin
        POP := T.Isi[T.Atas];
        T.Atas := dec[T.Atas];
 end;

i was modified your code and add a some code :
i use your initial code...

function POP (var T : Tumpukan) : integer;

 {*this function to check stack is empty or not*}
 function Empty(var T : Tumpukan): boolean;

 begin
   Empty := (T.Atas = 0)
 end;      

 begin
   if Empty(T) then
      POP := 0
   else
      begin
        POP := T.Isi[T.Atas];
        T.Atas := dec[T.Atas];
      end;
 end;

Ok. Hope this helps....

dnk commented: helping much, thanks for empty function. you are really good guy with smart code :) +1
Vega_Knight commented: hei, i get this one too +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

try this following code :

program Reverse_String;

 uses crt;

 const Elemen = 255;   {* Max character *}

 type S255     = string[Elemen];
      Stack = record
                   Input  : S255;
                   Tops : 0..Elemen
                 end;

 var  T       : Stack;  
      I       : integer;   
      StringInput : S255;     

  procedure AWALAN (var T : Stack);

  begin
    T.Tops := 0
  end;        

 
 procedure PUSH (var T : Stack; X : char);

 begin
   T.Tops := T.Tops + 1;
   T.Input[T.Tops] := X
 end;          {* PUSH *}

  function POP (var T : Stack) : char;

  begin
    POP := T.Input[T.Tops];
    T.Tops := T.Tops - 1
  end;         {* POP *}
 {*****************
  * Main program *
  *****************}
  begin
    clrscr;
    Awalan(T);
    writeln('Stack To reverse string');
    writeln('-------------------------------');
    writeln;

    {* String that it want to reverse*}
    write('Input any kind of Strings: ');
    readln(StringInput);

    clrscr;
    writeln('Original Strings:'); writeln(StringInput);

    writeln;writeln('Strings After Reverse:');

    {* push Input strings into Stack *}
    for I := 1 to length(StringInput) do
      PUSH (T, StringInput[I]);

    {* pop Stack Input until Input String reverse*}
    for I := 1 to length(StringInput) do
      write(POP(T));

    writeln
 end.
Jade_me commented: what a wonderful code +1
Naruse commented: nice one... +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

see this code :

Dim sql As String
Private Sub ViewData()
    Set rs = New ADODB.Recordset
        rs.CursorType = adOpenDynamic
        rs.LockType = adLockOptimistic
        rs.Open "SELECT * FROM Login Where UserID = '" & txtUserId.Text & "' AND Password = '" & txtPasw.Text & "'", Conn, , , adCmdText
       
    Set DataGrid1.DataSource = rs
    DataGrid1.Columns(0).Width = 2000
    DataGrid1.Columns(1).Width = 2000
   
    DataGrid1.AllowAddNew = False
    DataGrid1.AllowArrows = True
    DataGrid1.AllowDelete = False
    DataGrid1.AllowUpdate = False
End Sub
Private Sub ViewData2()
    Set rs = New ADODB.Recordset
        rs.CursorType = adOpenDynamic
        rs.LockType = adLockOptimistic
        rs.Open "select * from Login ", Conn
       
    Set DataGrid1.DataSource = rs
    'DataGrid1.Columns(0).Width = 2000
    'DataGrid1.Columns(1).Width = 2000
   
    DataGrid1.AllowAddNew = False
    DataGrid1.AllowArrows = True
    DataGrid1.AllowDelete = False
    DataGrid1.AllowUpdate = False
End Sub
Private Sub btnView_Click()
Access_Connector
Call ViewData
End Sub

Private Sub Form_Load()
Access_Connector
ViewData2
End Sub

ok. Hope this Helps...
don't forget to give feedback...

Sawamura commented: awesome +1
Jade_me commented: great +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi... Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

This following code to input string only, other character wont allowed to input.

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _
             Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _
             And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _
             Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then
            'space accepted
            If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then
                e.Handled = True
            End If
        End If
        If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) _
        Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 44) _
        Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 45) _
        Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 46) Then
            e.Handled = False
        End If
    End Sub

Tooltips :
drag tooltips control to your destination form then all of control has tooltips editor in their properties control. you can add text in tooltips properties (use like in vb 6).